let utils = data["utils"];
let STUtil = data["STUtil"];
let Node = data["Node"];
let SplayTree = data["SplayTree"];
let isInBbox = data["isInBbox"];
let getBboxOverlap = data["getBboxOverlap"];
let cmp = data["cmp"];
let rounder = data["rounder"];
let geomIn = data["geomIn"];
let geomOut = data["geomOut"];
let operation = data["operation"];
let Segment = data["Segment"];
let SweepEvent = data["SweepEvent"];
let SweepLine = data["SweepLine"];
let polygonClipping = data["polygonClipping"];
let DynamicLabel = data["DynamicLabel"];
console.log("16DynamicLabel03");
utils.extend(DynamicLabel.prototype, { ringArea: function (coords) { let p1, p2, p3, lowerIndex, middleIndex, upperIndex, i, total = 0; const coordsLength = coords.length, RADIUS = 6378137; if (coordsLength > 2) { for (i = 0; i < coordsLength; i++)i === coordsLength - 2 ? (lowerIndex = coordsLength - 2, middleIndex = coordsLength - 1, upperIndex = 0) : i === coordsLength - 1 ? (lowerIndex = coordsLength - 1, middleIndex = 0, upperIndex = 1) : (lowerIndex = i, middleIndex = i + 1, upperIndex = i + 2), p1 = coords[lowerIndex], p2 = coords[middleIndex], p3 = coords[upperIndex], total += (this.rad(p3[0]) - this.rad(p1[0])) * Math.sin(this.rad(p2[1])); total = total * RADIUS * RADIUS / 2 } return total }, polygonArea: function (coords) { let total = 0; if (coords && coords.length > 0) { total += Math.abs(this.ringArea(coords[0])); for (let i = 1; i < coords.length; i++)total -= Math.abs(this.ringArea(coords[i])) } return total }, calculateArea: function (geom) { let total = 0, i; switch (geom.type) { case "Polygon": return this.polygonArea(geom.coordinates); case "MultiPolygon": for (i = 0; i < geom.coordinates.length; i++)total += this.polygonArea(geom.coordinates[i]); return total; case "Point": case "MultiPoint": case "LineString": case "MultiLineString": return 0 }return 0 }, area: function (geojson) { return this.geomReduce(geojson, (value, geom) => value + this.calculateArea(geom), 0) }, geomReduce: function (geojson, callback, initialValue) { var previousValue = initialValue; return this.geomEach(geojson, (function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) { previousValue = 0 === featureIndex && void 0 === initialValue ? currentGeometry : callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) })), previousValue } });


return {
  "utils": utils,
  "STUtil": STUtil,
  "Node": Node,
  "SplayTree": SplayTree,
  "isInBbox": isInBbox,
  "getBboxOverlap": getBboxOverlap,
  "cmp": cmp,
  "rounder": rounder,
  "geomIn": geomIn,
  "geomOut": geomOut,
  "operation": operation,
  "Segment": Segment,
  "SweepEvent": SweepEvent,
  "SweepLine": SweepLine,
  "polygonClipping": polygonClipping,
  "DynamicLabel": DynamicLabel
}